home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 4 / BBS in a Box - Macintosh - Volume IV (January 1992) (BBS in a Box).iso / Files / Prog / U-Z / ViewPortTech < prev    next >
Encoding:
Text File  |  1987-12-31  |  10.8 KB  |  333 lines  |  [TEXT/MACA]

  1. THE VIEWPORT TECHNICIAN
  2. A Guide To Portable Software Design
  3. By Michael Brian Bentley
  4. (C) 1988 Scott, Foresman & Co.
  5. Scott, Foresman & Co. Publishers, 
  6. Glenview Illinois
  7. 647 pages
  8. ISBN 0-673-18383-1
  9.  
  10.     This is both a blatant attempt at Huxterism and a service to those who bought the book The Viewport Technician, a Guide To Portable Software Design. As printed in the current edition, the table of contents does not go down as many levels of detail as I believe it should. Although there is an index, I decided to kill three birds with an electronically guided rock by uploading this more complete form of the TOC. 
  11.     The third reason for which I uploaded this file is to plead for corrections. You can help improve later printings with your feedback. If you spot any unobvious (to me) or irritating (to you) glitches, let me know electronically. Anything goes, including typos ("dissociated" is not as good as "disassociated") and event loop lore (i.e. there's WaitNextEvent now, besides GetNextEvent). The things that are hardest for me to track down alone are the changes that obsolete parts of the book, because that means continually tracking updates to a number of different operating environments, a tedious/time consuming effort. Your thoughts in general are appreciated, pro or con.
  12.     If you have, or know of, a commercial or public domain product that supports portable development, a new or updated CASE system, or the release of a new portable environment (the EPS port of Sun's NeWS for the Macintosh, etc etc. for example), feel free to send the information to me, and I will (publisher permitting) attempt to incorporate the information into later printings or editions. The Viewport Technician is targeted toward commercial development for what are essentially store-bought personal computers, and as such does not (except peripherally) discuss anything except readily available product. Trust me when I write that there is PLENTY of material to cover, just on stuff that currently exists. 
  13.  
  14. The Essentials:
  15.  
  16. INTRODUCTION
  17. OBJECTIVES
  18. ACKNOWLEDGEMENTS
  19.  
  20. PART I    Overview                
  21. PART II    Program Organization    
  22. PART III    Environment Services
  23. PART IV    Program Orchestration
  24.  
  25. EPILOG
  26. APPENDICES
  27. GLOSSARY
  28. INDEX
  29.  
  30.  
  31. In Greater Detail:
  32.  
  33. Part I: Overview
  34.  
  35. 1 The New Assignment                3
  36. 2 Analyzing What's Needed                4
  37. 3 The Services of a Window System            5
  38. 4 A Short Description of the Machines            9
  39.     1 Apple Macintosh                10
  40.     2 IBM PC Family                11
  41.     3 Atari ST                13
  42.     4 Commodore Amiga            14
  43.     5 Apple ][GS                16
  44. 5 Conclusion                    18
  45.  
  46. Part II: Program Organization                
  47.  
  48. 1 Introduction                    21
  49. 2 Program Composition                22
  50.     1 Response Time and Responsibility        22
  51.         1   Simple Non-Real-time User I/O    23
  52.         2   A Non-Real-Time Example        23
  53.         3   Real-Time User I/O        23    
  54.         4   A Real-Time Example        24
  55.     2 Displays and Display Objects            25
  56.         1   The Display            26
  57.         2   The Use for a Window        27
  58.         3   Appearance -vs- Editing Rules    28
  59.         4   Active Objects Objects        29
  60.         5   Dialog Windows            30
  61.         6   Menus            31
  62.         7   User Behavior            31
  63.         8   Under The Hood            32
  64.     3 Modes                    34
  65.     4 Events and the Event Loop            36
  66.     5 Event Loop Portability            45
  67.     6 Initialization and Cleanup            47
  68.     7 Executable File (Runtime) Organization        53
  69.         1 Files and Resources        54
  70.         2 Resources            56
  71.     8 System Dependent (Pre-Compile) Files        58
  72. 3 Source File Organization                64
  73.     1 The Language Show            64
  74.     2 Handling Code Differences            66
  75.         1 Runtime Conditionals        66
  76.         2 Runtime Initialization and Prompting    67
  77.         3 Preprocessor Conditionals        67
  78.         4 Link-time Decisions        68
  79.         5 Overlays            69
  80.     3 Include Files                69
  81.         1 Nested Includes            71
  82.         2 A Full-Fledged Pascal Example    72
  83.         3 Caveats            72
  84.         4 Portable Pascal Code        74
  85.     4 Independent Compilation            75
  86.     5 Separate Compilation            76
  87.     6 Preprocessors and Macros            78
  88.         1 Introduction            78
  89.         2 FORTRAN            78
  90.         3 cpp                79
  91.         4 An Example            80
  92.         5 Modula 2            81
  93.         6 Macros                82
  94.         7 Preprocessor Difficulties        82
  95.     7 Overlays and Chaining            83
  96.     8 Modules and Units in Pascal             88
  97.         1 In General            88
  98.         2 Turbo Pascal for the IBM PC        89
  99.         3 Pascal/MT+            90
  100.         4 Microsoft Pascal            92
  101.         5 UCSD Pascal            94
  102.         6 Lisa Pascal (etc etc etc etc)        96
  103.         7 Separate Compilation in Modula 2    97    
  104.         8 Independent Compilation in C        100
  105.     9 Automating File and Program Construction    102
  106.         1 Program 1: The Make Utility        102
  107.         2 A Special Trick: Source File ID    104
  108.            Strings in Binary Files
  109.         3 Program 2: The Code Vault        105
  110.     10 Portable Pascal Using Preprocessors        107
  111.         1 Defining The Problem        107
  112.         2 Problems With Macros        109
  113.         3 The Portable Pascal Example        110
  114. 4 Coding Hints                    137
  115.     1 The Pascal Minor Arcana            139
  116.         1 Naming Conventions        139
  117.         2 Lengths of Names            139
  118.         3 Labels                140
  119.         4 Modula-2 Considerations        141
  120.         5 Reserved Words            141
  121.         6 Archaic Syntactical Differences    141
  122.         7 Pascal Constants            141
  123.         8 Pascal Types            143
  124.         9 Predefined String Functions        147
  125.         10 Predefined Constants        148
  126.         11 Declaration Order in a Program Block    148
  127.         12 Data Type Conversion        149
  128.         13 Storage, Stack Allocation and    151
  129.         14  Pointers
  130.         15 Pointer Expressions        153
  131.         16 PC Turbo Pascal Pointers        153
  132.         17 Turbo Pascal/Macintosh Address Of    154
  133.         18 Operator
  134.         19 TML Pascal Pointers        154
  135.         20 Pascal/MT+            154
  136.         21 Microsoft MS-Pascal Pointers    155
  137.         22 MS-Pascal Pointer Types        155
  138.         23 MS-Pascal Data Allocation        155
  139.         24 Conclusions            156
  140.         25 Pointer Validity            156
  141.         26 Absolute Addresses        157
  142.         27 Control Flow            157
  143.         28 Redeclaration of Identifiers in    158
  144.            One Scope
  145.         29 Interrupt Routines and Events    158
  146.         30 Two Flavors of the Keyword Inline    159
  147.         31 Conformant Arrays and        161
  148.            Functions as Parameters
  149.         32 Get and Put            161
  150.     2 The C Minor Arcana            162
  151.         1 Overview            162
  152.         2 C Portability Dont's        163
  153.         3 Some Do's of Software Portability    168
  154.         4 Limits                172
  155.  
  156. Part III: Environment Services
  157.  
  158. 1 Introduction                    175
  159. 2 Foundations                    176
  160.     1 The Runtime Interface            176
  161.         1 A Gem Roadmap            176
  162.         2 A Microsoft Windows Roadmap    182
  163.         3 A Macintosh Roadmap        184
  164.         4 A ][GS Roadmap            187
  165.         5 An Amiga Roadmap        188
  166.         6 Calling Standards            189
  167.     2 Primitive Datatypes            191
  168.         1 Macintosh, MS Windows, Gem, and    191
  169.            Amiga datatypes
  170.         2 Extended Pascal -vs- C Strings    194
  171.     3 Handles and Pointers            195
  172.         1 Macintosh            196
  173.         2 Gem                196
  174.         3 Type Casts and Generic Pointers    197
  175. 3 Event Managers                    200
  176.     1 Overview                201
  177.     2 Mouse Buttons                202
  178.     3 Recommendations                202
  179.     4 Event Data Structures            203
  180.     5 Event Queues                208
  181.     6 Receiving Events and Messages        211
  182.     7 Keyboard Events                214
  183.     8 Mouse Events                217
  184.     9 Device Driver Events            219
  185.     10 Event Priorities                220
  186. 4 Graphics                    221
  187.     1 Using the Graphics Library            221
  188.         1 Macintosh
  189.             1 Quickdraw in ROM        222
  190.             2 Pascal Calling Standards    222
  191.             3 Assembly Concerns    222
  192.             4 External Declarations    223
  193.         2 Gem                224
  194.         3 MS Windows            224
  195.             1 Assembly Conventions    225
  196.         4 ][GS                226
  197.         5 Amiga                226
  198.             1 Assembler Concerns    227
  199.     2 Coordinate Systems            227
  200.     3 The Point                244
  201.     4 Fundamental, Modal, and Temporal Concerns    248
  202.     5 The Line                250
  203.     6 The Pen                254
  204.     7 Drawing Modes                257
  205.     8 The Rectangle (and Friends)            261
  206.     9 Complicated Rectangle Operations        264
  207.     10 The Region                266
  208.     11 Pattern Fills                274
  209.     12 Polygons                281
  210.     13 Circles, Ellipses, Curves, and Arcs        285
  211.     14 Clipping                287
  212.     15 List of Primitives            293
  213.     16 Color                    295
  214.     17 Bitmaps                303
  215.     18 The Cursor                324
  216.     19 Data Structures                329
  217.     20 Extending and Interchanging Code        354
  218.     21 Low-Level Text Support            362
  219.     22 Miscellaneous Graphics Support Routines    371
  220.     23 Mapping Routines            373
  221.     24 Specialized Processor Control        375
  222.     25 Animation                378
  223. 5 Windows and Their Managers            389
  224.     1 Distinctions                389
  225.     2 Vocabulary                390
  226.     3 Windows and Multitasking            395
  227.     4 Screens -vs- Tiled Windows            396
  228.     5 Window Management Initialization        399
  229.     6 Window type Registration, Creation        400
  230.     7 Predefined Window Types            402
  231.     8 Visible Data Structures            409
  232.     9 Displaying a Window            417
  233.     10 Window Adjustments            418
  234.     11 Miscellaneous Routines            419
  235.     12 Window Dynamics            420
  236.     13 Closing a Window            422
  237.     14 Dragging a Window            423
  238.     15 Adjusting the Size of a Window        424
  239.     16 Drawing the Contents of a Window        426
  240.     17 Drawing/Painting Support Routines        427
  241.         1 Macintosh            427
  242.         2 Gem                427
  243.         3 MS Windows            428
  244.             1 Update List Control Routines    428
  245.             2 Display Contexts (DCs)    429
  246.             3 Area and Region Marking    430
  247.     18 Window Shutdown            430
  248.     19 Accessing the Fields of Window Data Records    431
  249.     20 Extensibility                432
  250.     21 Multitasking and Task Switching        433
  251.     22 Conclusions                435
  252. 6 Menus                        436
  253.     1  Command Input Methods            436
  254.     2  Jounalling and Macro Packages        437
  255.     3  Digression on Command Input Design         438
  256.     4  Design Constraints            439
  257.     5  Menu Composition            440
  258.     6  Common Roots and Subtle Differences        442
  259.     7  Displaying Menus                444
  260.     8  Creating and Redefining Menu Items        445
  261.     9  The Menu Bar                458
  262.     10 Manipulating the Desk Accessory Menus    461
  263.     11 Menu Initialization, Setup, and Takedown    462
  264.     12 Advanced Menu Building Routines        464
  265.     13 Menu Utility Routines            465
  266.     14 Special Effects                466
  267.     15 Menu Data Structures            467
  268.     16 Controlling Menu Feedback            469
  269. 7 On the Dialog, Form, Requester, and Alert        469
  270.     1 What They Are                469
  271.     2 Modal -vs- NonModal Dialogs        470
  272.     3 Data Structures                473
  273.     4 Dialog Management Initialization and Termination    476
  274.     5 Dialog (and Alert) Creation and Disposal    477
  275.     6 Dialog Resource Definition            481
  276.     7 Dialog Display                484
  277.     8 Dialog Manipulation            487
  278.     9 Dialog Item Manipulation            488
  279.     10 Dialog Sound Support            492
  280.     11 Dialog Interaction            493
  281.     12 Miscellaneous Routines            494
  282.     13 Dialog Extensions            495
  283. 8 Controls, Gadgets, and Icons                497
  284.     1 Overview                498
  285.         1 Using Controls            498
  286.         2 Learning Safely            498
  287.         3 General Types            499
  288.     2 Window Controls                499
  289.     3 Dialog and Alert Controls            506
  290.     4 Control Routines and Data Structures        513
  291.     5 Synopsis                519
  292. 9 Advanced Text Editing Support            526
  293. 10 Resources                     533
  294.     1 Resource Compilers and Editors         533
  295.     2 Decompilers                 534
  296.     3 Predefined Resource Types             534
  297.     4 Window System Resource Support         539
  298.  
  299. Part IV: Program Orchestration
  300.  
  301. 1 Methods and Automation                549
  302.     1  What is a Good Idea?            549
  303.     2  Prototyping                550
  304.     3  Communication and Memory            551
  305.         1 OK, How? By Capturing Connectivity    
  306.     4  Words and Pictures            552
  307.         1  DataFlow Diagrams        552
  308.         2  Nassi-Shneiderman Charts        560
  309.         3  Structure Charts            562
  310.         4  Very Briefly, Warnier-Orr        566
  311.     5 Examples of Automated Development Steps    567
  312.     6 Computer-Aided Software Design Packages    570
  313.     7 Hybrid Systems                572
  314.     8 Summary                572
  315.  
  316. EPILOG:    Disguising Nondescript Positions, States, and    574
  317.     Sequences with More Familiar Terms; Adding 
  318.     Charm and Memorabilia, Depth, Plot and 
  319.     Characterization to Terse Settings
  320.  
  321. 1 An Elaborate Example                575
  322. 2 Controls Are Objects                576
  323. 3 Portability                    577
  324. 4 Immediate Concerns                577
  325. 5 Finally                        578
  326.  
  327. Appendices
  328.  
  329. Appendix A For Further Reading            581
  330. Appendix B Routines                585
  331. Appendix C Declarations                601
  332.  
  333. Index                        641